<template>
  <el-card>
    <el-card>
      <el-row :gutter="10">
        <el-col :span="8">
          <el-card>今日购买人数:
            <el-tag type="success">{{ stuEmpTotal }}</el-tag>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>今日购买批次:
            <el-tag type="danger">{{ stuEmpUnTotal }}</el-tag>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>今日购买数量:
            <el-tag type="warning">{{ stuTotal }}</el-tag>
          </el-card>
        </el-col>
      </el-row>
    </el-card>
  </el-card>

</template>

<script>
import {
  getStudentEmpTotal, getStudentEmpUnTotal,
  getFinishCollegeStuTotal,
} from '@/api/studentemployment/studentemployment'

export default {
  data() {
    return {
      stuEmpTotal: 0,  //今日购买人数
      stuEmpUnTotal: 0, //今日购买批次
      stuTotal: 0  //今日购买数量
    }
  },
  mounted() {
    this.getStudentTotal()
    this.getStudentUnTotal()
    this.getStuTotal()
  },
  methods: {
    //统计今日购买人数
    getStuTotal() {
      getFinishCollegeStuTotal().then(res => {
        this.stuTotal = res.data
      })
    },
    //统计今日购买批次
    getStudentTotal() {
      getStudentEmpTotal().then(res => {
        this.stuEmpTotal = res.data
      })
    },
    //统计今日购买数量
    getStudentUnTotal() {
      getStudentEmpUnTotal().then(res => {
        this.stuEmpUnTotal = res.data
      })
    },
  }
}
</script>

<style scoped>
.el-card {
  margin: 3px;
}
</style>
